package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName scenes_devices
 */
@TableName(value ="scenes_devices")
@Data
public class ScenesDevices implements Serializable {
    /**
     * 场景id
     */
    private Integer scenesId;

    /**
     * 设备id
     */
    private Integer devicesId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ScenesDevices other = (ScenesDevices) that;
        return (this.getScenesId() == null ? other.getScenesId() == null : this.getScenesId().equals(other.getScenesId()))
            && (this.getDevicesId() == null ? other.getDevicesId() == null : this.getDevicesId().equals(other.getDevicesId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getScenesId() == null) ? 0 : getScenesId().hashCode());
        result = prime * result + ((getDevicesId() == null) ? 0 : getDevicesId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", scenesId=").append(scenesId);
        sb.append(", devicesId=").append(devicesId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}